home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 26 / AACD 26.iso / AACD / Online / PHP / include / php / ext / standard / basic_functions.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-03-04  |  5.8 KB  |  225 lines

  1. /*
  2.    +----------------------------------------------------------------------+
  3.    | PHP version 4.0                                                      |
  4.    +----------------------------------------------------------------------+
  5.    | Copyright (c) 1997-2001 The PHP Group                                |
  6.    +----------------------------------------------------------------------+
  7.    | This source file is subject to version 2.02 of the PHP license,      |
  8.    | that is bundled with this package in the file LICENSE, and is        |
  9.    | available at through the world-wide-web at                           |
  10.    | http://www.php.net/license/2_02.txt.                                 |
  11.    | If you did not receive a copy of the PHP license and are unable to   |
  12.    | obtain it through the world-wide-web, please send a note to          |
  13.    | license@php.net so we can mail you a copy immediately.               |
  14.    +----------------------------------------------------------------------+
  15.    | Authors: Andi Gutmans <andi@zend.com>                                |
  16.    |          Zeev Suraski <zeev@zend.com>                                |
  17.    +----------------------------------------------------------------------+
  18. */
  19.  
  20. /* $Id: basic_functions.h,v 1.75 2001/03/04 01:17:21 zeev Exp $ */
  21.  
  22. #ifndef BASIC_FUNCTIONS_H
  23. #define BASIC_FUNCTIONS_H
  24.  
  25. #include <sys/stat.h>
  26.  
  27. #include "zend_highlight.h"
  28.  
  29. #ifdef TRANS_SID
  30. #  include "url_scanner.h"
  31. #  include "url_scanner_ex.h"
  32. #endif
  33.  
  34. extern zend_module_entry basic_functions_module;
  35. #define basic_functions_module_ptr &basic_functions_module
  36.  
  37. PHP_MINIT_FUNCTION(basic);
  38. PHP_MSHUTDOWN_FUNCTION(basic);
  39. PHP_RINIT_FUNCTION(basic);
  40. PHP_RSHUTDOWN_FUNCTION(basic);
  41. PHP_MINFO_FUNCTION(basic);
  42. PHP_GINIT_FUNCTION(basic);
  43.  
  44. PHP_FUNCTION(constant);
  45. PHP_FUNCTION(intval);
  46. PHP_FUNCTION(doubleval);
  47. PHP_FUNCTION(strval);
  48. PHP_FUNCTION(toggle_short_open_tag);
  49. PHP_FUNCTION(sleep);
  50. PHP_FUNCTION(usleep);
  51. PHP_FUNCTION(flush);
  52. PHP_FUNCTION(gettype);
  53. PHP_FUNCTION(settype);
  54. PHP_FUNCTION(ip2long);
  55. PHP_FUNCTION(long2ip);
  56.  
  57. /* system functions */
  58. PHP_FUNCTION(getenv);
  59. PHP_FUNCTION(putenv);
  60.  
  61. PHP_FUNCTION(get_current_user);
  62. PHP_FUNCTION(set_time_limit);
  63.  
  64. PHP_FUNCTION(get_cfg_var);
  65. PHP_FUNCTION(set_magic_quotes_runtime);
  66. PHP_FUNCTION(get_magic_quotes_runtime);
  67. PHP_FUNCTION(get_magic_quotes_gpc);
  68.  
  69. void php_is_type(INTERNAL_FUNCTION_PARAMETERS, int type);
  70. PHP_FUNCTION(is_null);
  71. PHP_FUNCTION(is_resource);
  72. PHP_FUNCTION(is_bool);
  73. PHP_FUNCTION(is_long);
  74. PHP_FUNCTION(is_double);
  75. PHP_FUNCTION(is_numeric);
  76. PHP_FUNCTION(is_string);
  77. PHP_FUNCTION(is_array);
  78. PHP_FUNCTION(is_object);
  79. PHP_FUNCTION(is_scalar);
  80.  
  81. PHP_FUNCTION(error_log);
  82.  
  83. PHP_FUNCTION(call_user_func);
  84. PHP_FUNCTION(call_user_func_array);
  85. PHP_FUNCTION(call_user_method);
  86. PHP_FUNCTION(call_user_method_array);
  87.  
  88. PHP_FUNCTION(register_shutdown_function);
  89. PHP_FUNCTION(highlight_file);
  90. PHP_FUNCTION(highlight_string);
  91. ZEND_API void php_get_highlight_struct(zend_syntax_highlighter_ini *syntax_highlighter_ini);
  92.  
  93. PHP_FUNCTION(ini_get);
  94. PHP_FUNCTION(ini_set);
  95. PHP_FUNCTION(ini_restore);
  96.  
  97. PHP_FUNCTION(print_r);
  98.  
  99. PHP_FUNCTION(connection_aborted);
  100. PHP_FUNCTION(connection_status);
  101. PHP_FUNCTION(ignore_user_abort);
  102.  
  103. PHP_FUNCTION(getservbyname);
  104. PHP_FUNCTION(getservbyport);
  105. PHP_FUNCTION(getprotobyname);
  106. PHP_FUNCTION(getprotobynumber);
  107.  
  108. PHP_NAMED_FUNCTION(php_if_crc32);
  109.  
  110. PHP_FUNCTION(get_loaded_extensions);
  111. PHP_FUNCTION(extension_loaded);
  112. PHP_FUNCTION(get_extension_funcs);
  113.  
  114. PHP_FUNCTION(register_tick_function);
  115. PHP_FUNCTION(unregister_tick_function);
  116.  
  117. PHP_FUNCTION(is_uploaded_file);
  118. PHP_FUNCTION(move_uploaded_file);
  119.  
  120. /* From the INI parser */
  121. PHP_FUNCTION(parse_ini_file);
  122.  
  123. #ifdef PHP_WIN32
  124. typedef unsigned int php_stat_len;
  125. #else
  126. typedef int php_stat_len;
  127. #endif
  128.  
  129. PHPAPI int _php_error_log(int opt_err,char *message,char *opt,char *headers);
  130.  
  131. #if SIZEOF_INT == 4
  132. /* Most 32-bit and 64-bit systems have 32-bit ints */
  133. typedef unsigned int php_uint32;
  134. #elif SIZEOF_LONG == 4
  135. /* 16-bit systems? */
  136. typedef unsigned long php_uint32;
  137. #else
  138. #error Need type which holds 32 bits
  139. #endif
  140.  
  141. #define MT_N (624)
  142.  
  143. typedef struct {
  144.     HashTable *user_shutdown_function_names;
  145.     HashTable putenv_ht;
  146.     char *strtok_string;
  147.     char *locale_string;
  148.     char *strtok_pos1;
  149.     char *strtok_pos2;
  150.     char str_ebuf[40];
  151.     zval **array_walk_func_name;
  152.     zval **user_compare_func_name;
  153.     zend_llist *user_tick_functions;
  154.  
  155.     zval *active_ini_file_section;
  156.  
  157.     HashTable sm_protected_env_vars;
  158.     char *sm_allowed_env_vars;
  159.  
  160.     /* pageinfo.c */
  161.     long page_uid;
  162.     long page_inode;
  163.     long page_mtime;
  164.  
  165.     /* filestat.c */
  166.     char *CurrentStatFile;
  167.     php_stat_len CurrentStatLength;
  168.     struct stat sb;
  169.     struct stat lsb;
  170.  
  171.     /* rand.c */
  172.     php_uint32   state[MT_N+1];  /* state vector + 1 extra to not violate ANSI C */
  173.     php_uint32   *next;       /* next random value is computed from here */
  174.     int      left;        /* can *next++ this many times before reloading */
  175.  
  176.     /* syslog.c */
  177.     int syslog_started;
  178.     char *syslog_device;
  179.  
  180.     /* var.c */
  181.     zend_class_entry *incomplete_class;
  182.     zend_bool use_trans_sid;
  183.  
  184. #ifdef TRANS_SID
  185.     /* url_scanner.c */
  186.     url_adapt_state_t url_adapt_state;
  187.     /* url_scanner_ex.re */
  188.     url_adapt_state_ex_t url_adapt_state_ex;
  189. #endif
  190. } php_basic_globals;
  191.  
  192. #ifdef ZTS
  193. #define BLS_D php_basic_globals *basic_globals
  194. #define BLS_DC , BLS_D
  195. #define BLS_C basic_globals
  196. #define BLS_CC , BLS_C
  197. #define BG(v) (basic_globals->v)
  198. #define BLS_FETCH() php_basic_globals *basic_globals = ts_resource(basic_globals_id)
  199. extern int basic_globals_id;
  200. #else
  201. #define BLS_D
  202. #define BLS_DC
  203. #define BLS_C
  204. #define BLS_CC
  205. #define BG(v) (basic_globals.v)
  206. #define BLS_FETCH()
  207. extern php_basic_globals basic_globals;
  208. #endif
  209.  
  210. #if HAVE_PUTENV
  211. typedef struct {
  212.     char *putenv_string;
  213.     char *previous_value;
  214.     char *key;
  215.     int key_len;
  216. } putenv_entry;
  217. #endif
  218.  
  219. /* Values are comma-delimited
  220.  */
  221. #define SAFE_MODE_PROTECTED_ENV_VARS    "LD_LIBRARY_PATH"
  222. #define SAFE_MODE_ALLOWED_ENV_VARS        "PHP_"
  223.  
  224. #endif /* BASIC_FUNCTIONS_H */
  225.